/* Copyright (c) 2004-2024 Peigen.info. All rights reserved. */
package info.peigen.hotpot.business.product.core.domain;

import info.peigen.hotpot.business.product.facade.enums.ProductStatus;
import info.peigen.hotpot.common.core.domain.DomainObject;
import info.peigen.hotpot.common.core.enums.SortType;
import info.peigen.hotpot.common.core.enums.YesOrNo;
import jakarta.validation.constraints.NotEmpty;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.experimental.FieldDefaults;
import lombok.experimental.SuperBuilder;

/**
 * <b>(ProductShowCategory)</b>
 * 产品展示类目
 *
 * @author Peigen
 * @version 1.0.0
 * @since 2023/11/30
 */
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@Data
@NoArgsConstructor
@AllArgsConstructor
@FieldDefaults(level = AccessLevel.PRIVATE)
@Accessors(chain = true)
public class ProductShowCategory extends DomainObject {
    /** 真实类目Id */
    @NotEmpty
    String categoryId;
    /** 类目名 */
    @NotEmpty
    String name;
    /** 父类目Id */
    String  parentId;
    /** 是否叶子节点 */
    YesOrNo leaf;
    /** 类目层级 */
    Integer level;
    /** 完整父级路径：父父id_父id */
    String  path;
    /** 上架状态 */
    @Builder.Default
    ProductStatus status = ProductStatus.Not_On_Sell;
    /** 排序 */
    @Builder.Default
    SortType      sort   = SortType.DESC;
    /** 操作员 */
    String operatorId;
}
